package com.sofa.shark.common.core.enums;

import lombok.Getter;

/**
 * Created by Administrator on 2020/2/24.
 */

@Getter
public enum ExceptionEnums {

    NO_PEOPLE(1, "该人员不存在"),
    ALREADY_IDCARD(2, "身份证号已存在"),
    NO_USER(3, "用户不存在"),
    NO_DATA(4, "没数据"),
    ALREADY_PHONE(5, "电话号已存在"),
    NOT_ROLE_ID(6, "未获取到角色ID"),
    PHONE(7, "未输入电话号码"),
    NO_RECORD(8, "未选择记录"),
    TASK_RECODE_LIMIT(9, "重要记录数据保存时间大于12个月"),
    CHECK_PWD(10, "密码与原密码不符合"),
    DOOR_ALREADY(11, "门和通道一对一"),
    RUN_TIME_OUT(12, "请求超时"),
    USER_OR_PWD_ERROR(13, "用户不存在或账户密码错误!"),
    USER_EXIST(13, "用户名已存在!"),
    SUPER_ADMIN_NOT_DEL(14, "超级管理员不允许删除!"),
    OWN_CHILD_AREA(15, "该区域有子区域不允许删除"),
    NOT_ENUM(15, "未获取到枚举信息"),
    LIBRAY_NAME_EXIST(16, "库名已存在"),
    TIME_ERROR(17, "请输入正确的时间：开始时间小于结束时间"),
    SUPER_ROLE_NOT_DEL(18, "超级角色不允许删除"),
    CAMERA_IP_EXIST(19, "摄像机Ip已存在"),
    DEPT_NO_EXIST(20, "部门不存在"),
    MECHANISM_NO_EXIST(21, "职位不存在"),
    DEPT_NAME_ALREADY(22, "部门名称重复"),
    MECHANISM_NAME_ALREADY(23, "职位名称重复"),
    DOOR_AUTH_NO_EXIST(24, "门禁权限不存在"),
    DOOR_AUTH_NAME_ALREADY(25, "门禁权限名称重复"),
    AREA_AUTH_NO_EXIST(26, "区域权限不存在"),
    AREA_AUTH_NAME_ALREADY(27, "区域权限名称重复"),
    NOT_UPLOAD_PIC(28, "未上传图片"),
    UPLOAD_MUST(29, "请填写必填项"),
    NOT_EXCEL_DATA(30, "文件中未检测到有效数据，请重新编辑后重新导入！"),
    NOT_EXCEL_COLUMN(31, "检测文件中有某列数据有误，请重新编辑后重新导入!"),
    NO_STATIC_PERSON(32, "被拜访人员不存在"),
    SYSTEM_PAR_EXIST(33, "系统参数key已存在"),
    NO_CONNECT(34, "未连接"),
    ERROR(35, "操作失败"),
    EXPORT_DATA_ERROR(36, "导出数据不能大于两月"),
    IS_NOT_DIR(39, "临时文件目录不是一个文件夹"),
    COMPARE_DELETE_FAIL(10001, "比对服务器删除照片失败"),
    UPLOAD_FILE_ERROR(40, "文件上传失败！"),
    BEAN_ERROR(41, "配置错误"),
    HEAD_SETTING_ERROR(42, "未查询到有权限且在线的读头设备，请检查读头设备状态或权限设置！"),
    HEAD_ONLINE_ERROR(43, "未查询到在线的读头设备，请检查读头设备状态！"),
    EXPORT_FILE_ERROR(44, "文件导出失败！"),
    WRONG(99, "错误"),
    CONNECT_ERROR(100, "比对服务器连接异常");

    private int code;
    private String name;

    private ExceptionEnums(int code, String name) {
        this.code = code;
        this.name = name;
    }

}
